Mexican Sergio Perez qualified second for Force India but will drop five places due to an unscheduled gearbox change after he crashed in final practice on the Baku street circuit.
Red Bull's Max Verstappen, last year's winner at his team's home circuit, qualified third.
Kimi Raikkonen believes he still has the speed that Ferrari need despite reports that the Formula One team are lining up a replacement for 2016 in fellow-Finn Valtteri Bottas.
Lewis Hamilton took a big step towards clinching his fifth Formula One title after putting his Mercedes on pole position at the U.S. Grand Prix on Saturday with Ferrari rival Sebastian Vettel starting fifth.
Max Verstappen put Red Bull on pole position for the Canadian Grand Prix with Alpine's Fernando Alonso leaping onto the front row alongside the Formula One championship leader in a wet qualifying on Saturday.
Hamilton said he had not been feeling well on Thursday and Friday, when he was also up until midnight working with his engineers.
"I'm just extremely grateful that I'm here, and tonight I'm going to call my family and all my loved ones. I passed two metres from that crane. If, I had been two metres to the left, I would have been dead."
Verstappen took his 26th career win 0.9 of a second ahead of Spaniard Sainz,
Seven-times World champion Lewis Hamilton, Formula One's most successful driver of all time, will race for Ferrari from 2025.
The Finn lapped the six-km Baku street circuit in one minute, 40.495 seconds, just 0.059 seconds faster than team mate and championship leader Lewis Hamilton.
Ferrari's Fernando Alonso put his faith in Formula One's governing body and Pirelli ensuring safety at the German Grand Prix on Thursday after multiple tyre blowouts at last weekend's British race.
Lewis Hamilton led every lap from pole position to chequered flag, banging in a fastest lap for good measure to emphasise his supremacy
Kimi Raikkonen is enjoying being at Ferrari more than ever this season.
Finland's Valtteri Bottas took his first Formula One pole position at the Bahrain Grand Prix on Saturday with a sizzling lap that ended Mercedes team mate Lewis Hamilton's bid for a seventh in a row.
Will things be the same at Bahrain? Here's where we look to the front - by looking at what we've learnt.
Lewis Hamilton won the Monaco Grand Prix for Mercedes on Sunday, nursing his car's worn tyres to the finish in a nail-biting victory worthy of the team's late great Niki Lauda.
Ferrari made a strong start to the first day of Formula One testing, on Monday, with four-times world champion Sebastian Vettel top of the timesheets at lunchtime with 72 laps completed.
Paul di Resta retired in the first lap for the first time in his F1 career and Adrian Sutil finished 16th at the Italian Grand Prix in Monza on Sunday as Sahara Force India returned without points for the fourth time in the season.
Lewis Hamilton was made to wait for his fifth Formula One world championship, on Sunday, after the Mercedes driver finished only third in a US Grand Prix won by Ferrari veteran Kimi Raikkonen.
Ferrari are still waiting to take the fight to Formula One champions Mercedes after a Russian Grand Prix that left even their dominant rivals surprised by the gap in performance.
Formula One world champion Lewis Hamilton won the Hungarian Grand Prix from pole position for Mercedes on Sunday to go into the August break with a 24-point lead over Ferrari rival Sebastian Vettel.
Three-time world champion Lewis Hamilton, who incurred a penalty that ensured he finished second behind Ferrari's Sebastian Vettel at the Bahrain Grand Prix, has issued an apology to his Mercedes team.
Former world champion Kimi Raikkonen has renewed his contract with Ferrari and will race for them again next season, the Formula One team said.
The four-time world champion's fifth win of the season for Mercedes left him on 213 points to 189 for Ferrari's Sebastian Vettel, who finished second, and relishing the prospect of a stress-free family holiday.
Six time world champion Lewis Hamilton, winner of the British Grand Prix from pole position at the same circuit last weekend and 30 points clear of Valtteri Bottas after four races without spectators, was 0.138 seconds slower.
The German secured his first pole since Spain in May when the red flags came out with 36 seconds remaining, leaving team mate and championship leader Lewis Hamilton no chance of claiming a 12th pole in 14 races.
World champion Lewis Hamilton, back in the car after his COVID-19-enforced absence at last week's Sakhir Grand Prix, was third but only 0.086 seconds off the pace.
Champions Mercedes are chasing a sixth successive double, and Lewis Hamilton his sixth drivers' title, but the task looks tougher than ever.
Since its inaugural race in 2008 the Singapore Grand Prix has gained a reputation for being the toughest challenge in Formula One, providing drivers with an extreme test of endurance in the trickiest conditions.
Lewis Hamilton survived another first corner clash with Mercedes teammate Nico Rosberg on Sunday to take a fifth Canadian Grand Prix victory and cut the German's championship lead to nine points.
World champion Max Verstappen took maximum points from Formula One's Imola sprint weekend, leading a Red Bull one-two on Sunday as Ferrari's homecoming turned sour for overall leader Charles Leclerc and his Italian team.
The Briton lapped the Albert Park circuit in a searing one minute and 21.164 seconds to cross the line 0.664 seconds clear of Ferrari's Kimi Raikkonen.
Formula One is braced for the next episode of the Max Verstappen show as Red Bull's teen sensation heads for Ferrari's home circuit only days after making the Italian team's drivers see red. While triple world champion Lewis Hamilton is aiming for his 50th grand prix win on Sunday, to become the first since Argentine Juan Manuel Fangio in the 1950s to win three years in a row at Monza, Verstappen will be the talk of the town.
The 21-year-old is the first Ferrari driver since seven times champion Michael Schumacher to take four consecutive poles in a single season.
Lewis Hamilton believes Charles Leclerc has usurped four times world champion team mate Sebastian Vettel as Ferrari's favourite.
Team by team analysis of Sunday's Russian Grand Prix (listed in championship order):
Red Bull's Mark Webber faces a 10-place grid penalty at the Korean Grand Prix after being reprimanded for hitching a lift on Fernando Alonso's Ferrari at the end of Sunday's race in Singapore.
The pole was Hamilton's ninth in 10 races this season, the 47th of his career and left the Briton perfectly placed for a fifth career win at the Hungaroring.
Mercedes's brilliant pitstop strategy spoiled the game for Max Verstappen in Hungarian Grand Prix, says Rediff's F1 columnist Raja Sen.
Verstappen took a grid penalty at the previous race in Russia and finished second after starting at the back of the field, his progress helped after late rain caused problems for others.